package com.gitee.ixtf.vertx.internal.converter

import com.gitee.ixtf.vertx.ParameterConverter
import com.gitee.ixtf.vertx.internal.rc
import graphql.schema.DataFetchingEnvironment
import io.vertx.core.http.HttpServerResponse
import io.vertx.ext.web.RoutingContext

object HttpServerResponseParameterConverter : ParameterConverter<HttpServerResponse> {
  override suspend fun convert(env: DataFetchingEnvironment): HttpServerResponse =
      env.rc().response()

  override suspend fun convert(rc: RoutingContext): HttpServerResponse = rc.response()
}
